<?php

namespace App\Http\Requests\Api;

class UserRequest extends FormRequest
{
    public function rules()
    {
        switch ($this->method()) {
            case 'POST':
                $arr = [
                    'name' => 'string',
                    'avatar' => 'url',
                    'sex' => 'in:1,2',
                    'channel' => 'string',
                    'city' => 'string',
                    'province' => 'string',
                    'birthday' => 'date',
                ];
                return $arr;
                break;
        }
    }

    public function attributes()
    {
        return [
            'name' => '姓名',
            'avatar' => '头像',
            'sex' => '性别',
            'channel' => '渠道',
            'city' => '城市',
            'province' => '省份',
            'birthday' => '生日',
        ];
    }

    public function messages()
    {
        return [
            
        ];
    }
}
